package com.dushan.boot;

import com.dushan.boot.utils.SpringContextHolder;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;

/**
 * @Author：朗朗乾坤
 * @Package：com.dushan.boot
 * @Project：${PROJECT_NAME}
 * @name：${NAME}
 * @Date：${DATE} ${TIME}
 * @Filename：${NAME}
 */
@EnableDiscoveryClient
@SpringBootApplication
//@ComponentScan(basePackages={"com.dushan.boot"})
public class TestNacosApplication {
    public static void main(String[] args) {

        ConfigurableApplicationContext context =  SpringApplication.run(TestNacosApplication.class,args);
        SpringContextHolder.setApplicationContext(context);
//        String userHome = context.getEnvironment().getProperty("user.home");
//        System.out.println(userHome);
//        System.out.println("Hello world!");
    }
}